﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Example04.aspx.cs" Inherits="Chapter11.Example04" %>

<!DOCTYPE html>

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>代码清单 11-4 区分表格中的不同 th 元素</title>
    <meta name="author" content="Adam Freeman" />
    <meta name="description" content="A simple example" />
    <link rel="shortcut icon" href="Example01.Favicon.ico" type="image/x-ico" />
    <style>
        tr > th {
            text-align: left;
            background: grey;
            color: white;
        }
            tr > th:only-of-type {
                text-align: right;
                background: lightgrey;
                color: grey;
            }
    </style>
</head>
<body>
    <form>
        <div>
            <table>
                <tr>
                    <th>Rank</th>
                    <th>Name</th>
                    <th>Color</th>
                    <th>Size</th>
                </tr>
                <tr>
                    <th>Favorite:</th>
                    <td>Apples</td>
                    <td>Green</td>
                    <td>Medium</td>
                </tr>
                <tr>
                    <th>2nd Favorite</th>
                    <td>Oranges</td>
                    <td>Orange</td>
                    <td>Large</td>
                </tr>
                <tr>
                    <th>3rd Favorite:</th>
                    <td>Pomegranate</td>
                    <td>A kind of greeny-rd</td>
                    <td>Varies from medium to large</td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>
